package com.springday2annotate.dao.impl;

import com.springday2annotate.dao.BookDao;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Repository("bookDao3")
@Scope("prototype") // 注解作用范围
public class BookDaoImpl implements BookDao {
    @Value("${name}")
    private String name;

    @Value("666")
    private int age;

    @Override
    public void save() {
        System.out.println("book dao save ..." + name + "," +  age);
    }
}
